
<body bgcolor=ffffff>

<table width="100%">

  <?lsmb include letterhead.html ?>
  
  <tr>
    <td width=10> </td>

    <th colspan=3>
      <h4>A R V E</h4>
    </th>
  </tr>

  <tr>
    <td> </td>

    <td>
      <table width=100% cellspacing=0 cellpadding=0>
        <tr bgcolor=000000>
          <th align=left width="50%"><font color=ffffff>Arve Aadress</th>
          <th align=left width="50%"><font color=ffffff>Tarneaadress</th>
        </tr>

        <tr valign=top>
          <td><?lsmb name ?>
          <br><?lsmb address1 ?>
	  <?lsmb if address2 ?>
          <br><?lsmb address2 ?>
	  <?lsmb end address2 ?>
          <br><?lsmb city ?>
	  <?lsmb if state ?>
	  , <?lsmb state ?>
	  <?lsmb end state ?>
	  <?lsmb zipcode ?>
	  <?lsmb if country ?>
	  <br><?lsmb country ?>
	  <?lsmb end country ?>
          <br>

          <?lsmb if contact ?>
          <br><?lsmb contact ?>
          <br>
          <?lsmb end contact ?>

          <?lsmb if customerphone ?>
          <br>Tel: <?lsmb customerphone ?>
          <?lsmb end customerphone ?>

          <?lsmb if customerfax ?>
          <br>Faks: <?lsmb customerfax ?>
          <?lsmb end customerfax ?>

          <?lsmb if email ?>
          <br><?lsmb email ?>
          <?lsmb end email ?>
          </td>

          <td><?lsmb shiptoname ?>
          <br><?lsmb shiptoaddress1 ?>
	  <?lsmb if shiptoaddress2 ?>
          <br><?lsmb shiptoaddress2 ?>
	  <?lsmb end shiptoaddress2 ?>
          <br><?lsmb shiptocity ?>
	  <?lsmb if shiptostate ?>
	  , <?lsmb shiptostate ?>
	  <?lsmb end shiptostate ?>
	  <?lsmb shiptozipcode ?>
	  <?lsmb if shiptocountry ?>
	  <br><?lsmb shiptocountry ?>
	  <?lsmb end shiptocountry ?>
          <br>

          <?lsmb if shiptocontact ?>
          <br><?lsmb shiptocontact ?>
          <br>
          <?lsmb end shiptocontact ?>

          <?lsmb if shiptophone ?>
          <br>Tel: <?lsmb shiptophone ?>
          <?lsmb end shiptophone ?>

          <?lsmb if shiptofax ?>
          <br>Faks: <?lsmb shiptofax ?>
          <?lsmb end shiptofax ?>

          <?lsmb if shiptoemail ?>
          <br><?lsmb shiptoemail ?>
          <?lsmb end shiptoemail ?>
          </td>
        </tr>
      </table>
    </td>
  </tr>

  <tr height=5></tr>
  
  <tr>
    <td> </td>
  
    <td>
      <table width=100% border=1>
        <tr>
	  <th width=14% align=left nowrap>Arve NR.</th>
	  <th width=14% align=left nowrap>Kuupäev</th>
	  <th width=14% align=left nowrap>Maksetähtaeg</th>
	  <th width=14% align=left>Tellimus NR.</th>
	  <th width=14% align=left nowrap>Müüja</th>
	  <th width=14% align=left nowrap>Arve aadress</th>
	  <th width=14% align=left nowrap>Tarneviis</th>
	</tr>

	<tr>
	  <td><?lsmb invnumber ?></td>
	  <td><?lsmb invdate ?></td>
	  <td><?lsmb duedate ?></td>
	  <td><?lsmb ordnumber ?> </td>
	  <td><?lsmb employee ?> </td>
	  <td><?lsmb shippingpoint ?> </td>
	  <td><?lsmb shipvia ?> </td>
	</tr>
      </table>
    </td>
  </tr>

  <tr>
    <td> </td>
  
    <td>
      <table width="100%">
        <tr bgcolor=000000>
          <th align=right><font color=ffffff>AR.</th>
          <th align=left><font color=ffffff>Number</th>
          <th align=left><font color=ffffff>Nimetus</th>
          <th> </th>
          <th align=right><font color=ffffff>Kogus</th>
          <th> </th>
          <th align=right><font color=ffffff>Ühiku Hind</th>
          <th align=right><font color=ffffff>Ale %</th>
          <th align=right><font color=ffffff>Summa</th>
        </tr>

        <?lsmb foreach number ?>
        <tr valign=top>
          <td align=right><?lsmb runningnumber ?>.</td>
          <td><?lsmb number ?></td>
          <td><?lsmb description ?></td>
          <td><?lsmb deliverydate ?></td>
          <td align=right><?lsmb qty ?></td>
          <td><?lsmb unit ?></td>
          <td align=right><?lsmb sellprice ?></td>
          <td align=right><?lsmb discountrate ?></td>
          <td align=right><?lsmb linetotal ?></td>
        </tr>
        <?lsmb end number ?>

        <tr>
          <td colspan=9><hr noshade></td>
        </tr>
    
        <tr>
          <?lsmb if taxincluded ?>
          <th colspan=7 align=right>Kokku</th>
          <td colspan=2 align=right><?lsmb invtotal ?></td>
          <?lsmb end taxincluded ?>

          <?lsmb if not taxincluded ?>
          <th colspan=7 align=right>Vahesumma</th>
          <td colspan=2 align=right><?lsmb subtotal ?></td>
          <?lsmb end taxincluded ?>
        </tr>

        <?lsmb foreach tax ?>
        <tr>
          <th colspan=7 align=right><?lsmb taxdescription ?> on <?lsmb taxbase ?> @ <?lsmb taxrate ?> %</th>
          <td colspan=2 align=right><?lsmb tax ?></td>
        </tr>
        <?lsmb end tax ?>

        <?lsmb if paid ?>
        <tr>
          <th colspan=7 align=right>Makstud</th>
          <td colspan=2 align=right>- <?lsmb paid ?></td>
        </tr>
        <?lsmb end paid ?>

        <tr>
          <td colspan=5> </td>
          <td colspan=4><hr noshade></td>
        </tr>

        <?lsmb if total ?>
        <tr>
          <td colspan=5> </td>
          <th colspan=2 align=right nowrap>Deebetsaldo</th>
          <th colspan=2 align=right><?lsmb total ?></th>
        </tr>
        <?lsmb end total ?>

        <tr>
      </table>
    </td>
  </tr>

  <tr>
    <td> </td>

    <td>
      <table width="100%">
        <tr valign=top>
          <?lsmb if notes ?>
          <td><?lsmb notes ?></td>
          <?lsmb end notes ?>

	  <td><?lsmb text_amount ?> ***** <?lsmb decimal ?>/100</td>
	  
          <td align=right nowrap>
          Kõik hinnad <b><?lsmb currency ?></b> vääringus.
          </td>
        </tr>
      </table>
    </td>
  </tr>

  <?lsmb if paid_1 ?>
  <tr>
    <td> </td>

    <td colspan=9>
      <table width="60%">

        <tr>
          <th align=left>Maksed</th>
        </tr>

        <tr>
          <td colspan=4>
          <hr noshade>
          </td>
        </tr>

        <tr>
          <th align=left>Kuupäev</th>
          <th align=left>Konto</th>
          <th align=left>Alus</th>
          <th align=left>Summa</th>
        </tr>
  <?lsmb end paid_1 ?>

        <?lsmb foreach payment ?>
        <tr>
          <td><?lsmb paymentdate ?></td>
          <td><?lsmb paymentaccount ?></td>
          <td><?lsmb paymentsource ?></td>
          <td><?lsmb payment ?></td>
        </tr>
        <?lsmb end payment ?>

  <?lsmb if paid_1 ?>
      </table>
    </td>
  </tr>
  <?lsmb end paid_1 ?>

  <tr height=10></tr>

  <tr>
    <td> </td>

    <th>
    Thank you for your valued business!
    </th>
  </tr>

  <tr>
    <td> </td>

    <td>
      <table width="100%">
        <tr valign=top>
          <td width="60%"><font size=-3>
          Maksetähtaeg <?lsmb duedate ?> kuupäevaks.
          Items returned are subject to a 10% restocking charge. A return authorization must be obtained from <?lsmb company ?> before goods are returned. Returns must be shipped prepaid and properly insured. <?lsmb company ?> will not be responsible for damages during transit.
          </font>
          </td>

          <td width="40%">
          X <hr noshade>
          </td>
        </tr>
      </table>
    </td>
  </tr>

  <?lsmb foreach tax ?>
  <tr>
    <td> </td>

    <th colspan=9 align=left><font size=-2><?lsmb taxdescription ?> Käibemaksukohuslase number: <?lsmb taxnumber ?></th>
  </tr>
  <?lsmb end tax ?>

  <?lsmb if taxincluded ?>
  <tr>
    <td> </td>
  </tr>

  <tr>
    <th colspan=8 align=left><font size=-2>Hind sisaldab käibemaksu.</th>
  </tr>
  <?lsmb end taxincluded ?>

</table>

</body>
</html>











